package com.rybbaby.tss.front.tssPertainRelation.entity;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 * @description 所属关系
 * 
 * @author 雷春琼
 * 
 * @createDate 2017-08-14 上午10:34:49
 */
@Entity
@Table(name = "tss_pertain_relation")
@DynamicUpdate(true)
@DynamicInsert(true)
public class TssPertainRelation implements Serializable {
	
	private static final long serialVersionUID = 264437517647134L;
	
	/** 主键 **/
	private String id;
	/** 客户Id **/
	private String studentId;
	/** 姓名 **/
	private String patriarchName;
	/** 所属关系 **/
	private Integer affiliationRelation;
	/** 职业 **/
	private Integer profession;
	/** 创建时间 **/
	private java.sql.Timestamp createTime;
	/** 更新时间 **/
	private java.sql.Timestamp updateTime;
	/** 联系电话 **/
	private String contactPhone;
	/** 版本 **/
	private Integer version;
	/** 家长身份类型 1决策人,2监护人 **/
	private  Integer positionType;

	/**
	 * 方法: 取得主键
	 *
	 * @return java.lang.Integer 主键
	 */
	@Id
	@GeneratedValue(generator = "tss_pertain_relationIDGenerator" , strategy = GenerationType.AUTO)
	@GenericGenerator(name = "tss_pertain_relationIDGenerator" , strategy = "uuid")
	@Column(name = "id", nullable= false, length = 11)
	public String getId() {
		return this.id;
	}
	
	/**
	 * 方法: 设置主键
	 *
	 * @param id 主键
	 */
	public void setId(String id) {
		this.id = id;
	}
	
	/**
	 * 方法: 取得客户Id
	 *
	 * @return java.lang.Integer 客户Id
	 */
	@Column(name = "studentId", nullable= true, length = 11)
	public String getStudentId() {
		return this.studentId;
	}
	
	/**
	 * 方法: 设置客户Id
	 *
	 * @param studentId 客户Id
	 */
	public void setStudentId(String studentId) {
		this.studentId = studentId;
	}

	/**
	 * 方法: 取得姓名
	 *
	 * @return java.lang.String 姓名
	 */
	@Column(name = "patriarchName", nullable= true, length = 12)
	public String getPatriarchName() {
		return patriarchName;
	}

	public void setPatriarchName(String patriarchName) {
		this.patriarchName = patriarchName;
	}

	/**
	 * 方法: 取得所属关系
	 *
	 * @return java.lang.Integer 所属关系
	 */
	@Column(name = "affiliationRelation", nullable= true, length = 11)
	public Integer getAffiliationRelation() {
		return this.affiliationRelation;
	}
	
	/**
	 * 方法: 设置所属关系
	 *
	 * @param affiliationRelation 所属关系
	 */
	public void setAffiliationRelation(Integer affiliationRelation) {
		this.affiliationRelation = affiliationRelation;
	}
	
	/**
	 * 方法: 取得职业
	 *
	 * @return java.lang.Integer 职业
	 */
	@Column(name = "profession", nullable= true, length = 11)
	public Integer getProfession() {
		return this.profession;
	}
	
	/**
	 * 方法: 设置职业
	 *
	 * @param profession 职业
	 */
	public void setProfession(Integer profession) {
		this.profession = profession;
	}



	/**
	 * 方法: 取得创建时间
	 *
	 * @return java.sql.Timestamp 创建时间
	 */
	@Column(name = "createTime", nullable= true, length = 19)
	public java.sql.Timestamp getCreateTime() {
		return this.createTime;
	}
	
	/**
	 * 方法: 设置创建时间
	 *
	 * @param createTime 创建时间
	 */
	public void setCreateTime(java.sql.Timestamp createTime) {
		this.createTime = createTime;
	}

	@Column(name = "updateTime", nullable= true, length = 19)
	public Timestamp getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Timestamp updateTime) {
		this.updateTime = updateTime;
	}
	
	/**
	 * 方法: 取得版本
	 *
	 * @return java.lang.Integer 版本
	 */
    @Version
	@Column(name = "version", nullable= true, length = 11)
	public Integer getVersion() {
		return this.version;
	}
	
	/**
	 * 方法: 设置版本
	 *
	 * @param version 版本
	 */
	public void setVersion(Integer version) {
		this.version = version;
	}

	@Column(name = "contactPhone", nullable= true, length = 11)
	public String getContactPhone() {
		return contactPhone;
	}

	public void setContactPhone(String contactPhone) {
		this.contactPhone = contactPhone;
	}

	@Column(name = "positionType", nullable= true, length = 11)
	public Integer getPositionType() {
		return positionType;
	}

	public void setPositionType(Integer positionType) {
		this.positionType = positionType;
	}
}